<?php

/* It is not allowed to create an instance of a class that has been defined as abstract.
 * Any class that contains at least one abstract method must also be abstract. Methods defined
 * as abstract simply declare the method's signature they cannot define the implementation.
 */
  abstract class Human
  {
    // Force "Extending class" to define getHairs() method
    abstract protected function getHairSize();

    // Force "Extending class" to define getEyes() method
    abstract protected function getEyeColor();

    // Common method
    public function playMusic() {
      return 'guitar';
    }
  }

  class Man extends Human
  {
    private $hairSize = 5; //in cm
    private $eyeColor = 'brown'; //in cm

    function  getHairSize()
    {
      return $this->hairSize;
    }

    function setHairSize($size)
    {
      $this->hairSize = $size;
    }

    function setEyeColor($color)
    {
      $this->eyeColor = $color;
    }

    function  getEyeColor()
    {
      return $this->eyeColor;
    }
   public function playMusic() {
      return 'Tabala';
    }
  }

  $vikas = new Man;

  $vikas->setHairSize(76);
  echo $vikas->getHairSize();
  echo "\n\n";
  $vikas->setEyeColor('green');
  echo $vikas->getEyeColor();
  echo "\n\n";
  echo $vikas->playMusic();
  echo "\n\n";
